package com.reptile.init;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;

/**
 * 初始化加载的统一处理类
 */
@Slf4j
@Component
public class YsDataRunTime implements CommandLineRunner {

    @Resource
    private  AsyncService asyncService;

    @Async("asyncServiceExecutor")
    @Override
    public void run(String... args) throws Exception {
        asyncService.initYsMaterial();
        //初始化initWallHavenPic
        asyncService.initWallHavenPic();
    }
}
